package com.tiger.cloud.enums;

/**
 * 通用枚举类型
 */
public enum PointCodeEnum {

	REGISTER("REGISTER", "注册" ,1)
	, INSERT_CUSTOMER("INSERT_CUSTOMER", "添加客户",1)
	, SHARE_CODE_ADD_USER_PASSIVE("SHARE_CODE_ADD_USER_PASSIVE", "扫描添加同行(被扫描者)", 1)
	, SHARE_CODE_ADD_USER_ACTIVE("SHARE_CODE_ADD_USER_ACTIVE", "扫描添加同行(扫描者)", 1)
	, SEARCH_ADD_USER("SEARCH_ADD_USER", "搜索添加用户", -1)
	, SHARE_1_USER("SHARE_1_USER", "分享成功1个用户", 1)
	, SHARE_50_USER("SHARE_50_USER", "分享成功50个用户", 50)
	, SHARE_100_USER("SHARE_100_USER", "分享成功100个用户", 100)
	, ACCEPT_SHARE_100_USER("ACCEPT_SHARE_100_USER", "接受分享成功1个用户", 1)
	, USER_INFO_COMPLETE("USER_INFO_COMPLETE", "个人信息完整", 1)
	, USER_COMPANY_INFO_COMPLETE("USER_COMPANY_INFO_COMPLETE", "公司信息完整", 1)
	, ADD_MUTI_USER_COMPANY("ADD_MUTI_USER_COMPANY", "添加1个公司&总公司>1", -10)
	, ADD_MUTI_COMMUCATION("ADD_MUTI_COMMUCATION", "添加多个借款意向", -10)
	, ACCEPT_SEARCH_ADD_USER("ACCEPT_SEARCH_ADD_USER","接受搜索同行添加",1)
	,MAIL_LIST_ADD_USER("MAIL_LIST_ADD_USER","通过通讯录添加同行",1)
	,ACCEPT_MAIL_LIST_ADD_USER("ACCEPT_MAIL_LIST_ADD_USER","接受通讯录匹配添加同行",1)

	,ADD_PEER_CIRCLE("ADD_PEER_CIRCLE","同行圈添加好友",1)
	,ACCEPT_PEER_CIRCLE("ACCEPT_PEER_CIRCLE","接受来自同行圈好友申请",1);



	private String code;
	private String desc;
	private Integer peopleCount;



	private PointCodeEnum(String code, String desc, Integer peopleCount) {
		this.code = code;
		this.peopleCount = peopleCount;
	}

	/**
	 * 通过枚举<code>name</code>获取枚举
	 */
	public static PointCodeEnum getEnumByCode(String code) {
		if(code==null){
			return null;
		}
		for (PointCodeEnum enumm : PointCodeEnum.values()) {
			if (enumm.getCode().equals(code)) {
				return enumm;
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	public Integer getPeopleCount() {
		return peopleCount;
	}

}
